// 工程师相关类型
import type { BaseEntity, SelectOption } from '../common/base';

export interface EmailEntry {
  authorName: string;
  email: string;
}

export interface BaseEngineer extends BaseEntity {
  name: string;
  role?: string;
  deptId?: string;
}

export interface Engineer extends BaseEngineer {
  emails: EmailEntry[];
}

export type EngineerOption = SelectOption<string>;

export interface TopCommitter {
  name: string;
  commitCount: number;
  totalChanges: number;
  role: string;
  department: string;
  averageMonthlyCommits?: number; // 历史Top5特有
  averageMonthlyChanges?: number; // 历史Top5特有
}

export interface EngineerStats {
  totalEngineers: number;
  backendEngineers: number;
  frontendEngineers: number;
}

export interface EngineerEmail {
  id: string;
  authorFullname: string;
  authorEmail: string;
  engineerId: string;
  engineerName: string;
  createdAt: string;
  updatedAt: string;
}

export interface AuthorInfo {
  authorFullname: string;
  authorEmail: string;
  engineerName: string;
}
